﻿function dialog(bg,dialog) {
    $("#" + bg).show();
    var bH = $("body").height();
    var bW = $("body").width();
    $("#" + dialog).show();
    var dialog_content = document.getElementById(dialog);
    var wW = (bW - 850 - 24) / 2;
    var hH = $(document).scrollTop() + ($(window).height() - dialog_content.offsetHeight) / 2;
    $("#" + bg).css({ width: bW, height: bH });
    $("#" + dialog).css({ left: wW, top: hH });
    //关闭
    $(".close_login").click(
	function () {
	    diaClose();
	});
}
function diaClose() {
    $("#full_bg").hide();
    $("#login_dialog").hide();
}